Document.Export
Description:
Exports a selection of views in PDF format.
Exports a selection of views in PDF format.
Overloads (14):
Export(String,IList[ElementId],PDFExportOptions)
public bool Export(
string folder,
IList<ElementId> viewIds,
PDFExportOptions options
)
-
StringfolderOutput folder, into which file(s) will be exported. The folder must exist.
-
IList<ElementId>viewIdsSelection of ordered views to be exported. The list must contain at least one valid view.
-
optionsVarious options applicable to the PDF format.
Return Value
Boolean
True if all specified views are exported successfully,
False if exporting of any view fails, even if some views might have been exported successfully.
-
non empty list of views must be provided. -or- NullOrEmpty -or- There are duplicate views in viewIds -or- some of the views are not printable (exportable). -or- Thrown when one or more input arguments are invalid.
-
A non-optional argument was null
-
Thrown when the target PDF file is inaccessible, e.g. already opened.
-
"Running background tasks is disabled when DisableBackgroundProcesses is set in Revit.ini." -or- "A background process is already running in this document." -or- "The maximum number of background processes (3) has been reached." -or- Cannot export PDF in the background while in edit mode. -or- Running background tasks is not allowed in a Family document. -or- Export is temporarily disabled. -or- Exporting is not allowed in the current application mode.
-
The folder does not exist.